package com.iteaj.iot.client.modbus;

import com.iteaj.iot.client.ClientComponent;
import com.iteaj.iot.client.TcpSocketClient;
import com.iteaj.iot.client.modbus.codec.ModbusClientDecoder;
import com.iteaj.network.config.ConnectProperties;
import io.netty.channel.ChannelInboundHandler;

import java.nio.ByteOrder;

public class IotModbusClient extends TcpSocketClient {

    protected IotModbusClient(ClientComponent clientComponent, String host, int port) {
        super(clientComponent, new ConnectProperties(host, port));
    }

    @Override
    protected ChannelInboundHandler getClientProtocolDecoder() {
        return new ModbusClientDecoder(ByteOrder.BIG_ENDIAN);
    }

}
